PUT

Syntax: PUT [#channel\file_position,] [item1 *[,itemi]* ...]      
    or: PUT [#channel,] [item1 *[,itemi]* ...]
Location: Toolkit II, THOR XVI

This command forms the complement to GET and allows you to store variables in the specified channel (default #3) in the QL's internal format. The variables are stored at the current position in the file (or the file_position given with the command, if the first variant is used). If you provide more than one variable ned in the file in one go.

If no variable is specified, the file pointer will be set to the specified position if the first variant is used. If the second variant is used, this will have no effect. 

If a variable is given as the file pointer, then this variable will be updated with the current file position once PUT has finished its work.

PUT can actually be used to store variables in a different type to their current use (this might, for example, be useful if storing part of a string), by adding the following suffixes to each item:   

...+0 Force floating point type
...&'' Force string type 
...||0 Force integer type

Example: 
a$='Entry 123':PUT #3,a$,a$(7 TO) || 0 
will store in channel #3 two bytes giving the length of the string a$, followed by the characters of the string itself, followed by two bytes representing the integer value 123 (ie. 0*256+123).

CROSS-REFERENCE: 
See PUT, BPUT, WPUT, LPUT, UPUT and GET.
